package goodenglish.interfaces.videoplay;

import goodenglish.infrastructure.Config;
import javafx.scene.control.Label;
import javafx.scene.effect.Lighting;
import javafx.scene.effect.SepiaTone;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;

public class SubtStudyLabel extends BorderPane {
	public Label playLabel = new Label();
	private int studyY = 0;
	private int viewY = Config.SCREEN_HEIGHT - 160;
	int viewHight = 60;
	String blcakStrle = "-fx-background-color: black;-fx-text-alignment:center;-fx-alignment: bottom-center;";
	String noblcakStrle = "-fx-background-color: null;-fx-text-alignment:center;-fx-alignment: bottom-center;";
	String currentStyle = noblcakStrle;

	public SubtStudyLabel() {
		playLabel.setText("");
		playLabel.setStyle(noblcakStrle);
		playLabel.setWrapText(true);
		playLabel.setLayoutY(viewY);
		playLabel.setFont(new Font(40));
		playLabel.setEffect(new Lighting());
		playLabel.setEffect(new SepiaTone());// 产生棕褐色调效果，类似古董的照片。
		playLabel.setTextFill(Color.WHITE);
		this.setCenter(playLabel);
	}

	/**
	 * 为学习展示
	 */
	public void displayForStudy(String str) {

		this.setLayoutY(studyY);
		this.setStyle(this.blcakStrle);
		// playLabel.setStyle(this.blcakStrle);
		playLabel.setText(str);

	}

}
